﻿<%@ Page Title="" Language="C#" MasterPageFile="~/clerks/ClerkMaster.Master" AutoEventWireup="true" CodeBehind="AddSupplier.aspx.cs" Inherits="LogicUniversity.clerks.AddSupplier" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <form id="form1" runat="server">
        <div class="row-fluid">
            <div class="span3 offset2">
                <h4>Add Supplier</h4>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label1" runat="server" Text="Supplier Code"></asp:Label>
            </div>
            <div class="span3">
                <asp:TextBox ID="TextBox1" runat="server" Height="22px" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label2" runat="server" Text="Supplier Name"></asp:Label>
            </div>
            <div class="span3">
                <asp:TextBox ID="TextBox2" runat="server" Height="22px" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label3" runat="server" Text="Contact Name"></asp:Label>
            </div>
            <div class="span3">
                <asp:TextBox ID="TextBox3" runat="server" Height="22px" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label4" runat="server" Text="Phone No"></asp:Label>
            </div>
            <div class="span3">
                 <asp:TextBox ID="TextBox4" runat="server" Height="22px" onkeyup="value=value.replace(/[^\d]/g,'')" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label5" runat="server" Text="Fax No"></asp:Label>
            </div>
            <div class="span3">
                <asp:TextBox ID="TextBox5" runat="server" Height="22px" onkeyup="value=value.replace(/[^\d]/g,'')" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span2 tabs-right">
                <asp:Label ID="Label6" runat="server" Text="Address"></asp:Label>
            </div>
            <div class="span3">
                <asp:TextBox ID="TextBox6" runat="server" style="margin-left: 0px" 
            Height="67px" TextMode="MultiLine" ></asp:TextBox>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span3 offset2">
                <asp:Button CssClass="btn btn-primary" ID="Button1" runat="server" Text="Add" onclick="Button1_Click" onclientclick="lose()"/>
            </div>
        </div>
    <div>
    
        </div>
    
    </form>

    <script language="javascript" type="text/javascript">
        function lose() {
            var txt1 = document.getElementById("TextBox1").value;
            var txt2 = document.getElementById("TextBox2").value;
            var txt3 = document.getElementById("TextBox3").value;
            var txt4 = document.getElementById("TextBox4").value;
            var txt5 = document.getElementById("TextBox5").value;
            var txt6 = document.getElementById("TextBox6").value;

            if (txt1 == "" || txt2 == "" || txt3 == "" || txt4 == "" || txt5 == "" || txt6 == "")
                alert("Must fill up all information");
        }
        
    </script>
</asp:Content>
